#include <iostream>
#include <stdio.h>
#include <vector>
#include <cmath>

using namespace std;

typedef struct plane
{
    int t, d, l;
}Plane;

vector<Plane> planes(100);
bool st[100];

bool dfs(int cnt, int n, int  last)
{
    if (cnt == n)
    {
        return true;
    }

    for (int i = 0; i < n; i++)
    {
        if (!st[i] && planes[i].t+planes[i].d >= last)
        {
            st[i] = true;
            /**
             * only find one solution
             * after return true, it wiil stop the recursion
             */
            if (dfs(cnt+1, n, max(last, planes[i].t)+planes[i].l))
                return true;
            st[i] = false;
        }
    }
    return false;
}

int main()
{
    int T;
    scanf("%d", &T);

    while(T--)
    {
        int N;
        scanf("%d", &N);
        for (int i=0; i < N; i++)
        {
            scanf("%d%d%d", &planes[i].t, &planes[i].d, &planes[i].l);
            st[i] = false;
        }

        if(dfs(0, N, 0))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}